DISCUSSION
You can register your callback function by calling the function
ATSUCreateMemorySetting and passing the constant
kATSUUseCallbacks in
iHeapSpec and a pointer to the
ATSUMemoryCallbacks union in
iMemoryCallbacks. You then supply a pointer of type
ATSUCustomFreeFunc in the
Free field of the
callbacks structure of the
ATSUMemoryCallbacks union.